package com.flextribe.display.mxml
{
	import com.flextribe.display.TribeStage;
	import com.flextribe.events.TribeStageEvent;
	
	import mx.core.UIComponent;

	/**
	 *  Dispatched when the mouse gets on the player's stage.
	 *
	 *  @eventType com.flextribe.events.TribeStageEvent.STAGE_OVER
	 */
	[Event(name="stageOver", type="com.flextribe.events.TribeStageEvent")]

	/**
	 *  Dispatched when the mouse gets on the player's stage.
	 *
	 *  @eventType com.flextribe.events.TribeStageEvent.STAGE_OUT
	 */
	[Event(name="stageOut", type="com.flextribe.events.TribeStageEvent")]
	
	
	public class TribeStageFx extends UIComponent
	{
		private var tribeStage:TribeStage;
		
		public function TribeStageFx():void
		{
			tribeStage = new TribeStage(this);
			tribeStage.addEventListener(TribeStageEvent.STAGE_OVER, onStageEvent);
			tribeStage.addEventListener(TribeStageEvent.STAGE_OUT, onStageEvent);
		}
		private function onStageEvent(event:TribeStageEvent):void{
			this.dispatchEvent(new TribeStageEvent(event.type));
		}
		
	}
}